package com.wing.cabinet.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.cabinet.model.entity.CabinetCargoSpace;
import com.wing.cabinet.model.entity.StorageInventoryInout;
import com.wing.cabinet.model.request.CabinetCargoSpaceForm;
import com.wing.cabinet.model.response.CabinetCargoSpaceVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 收刀柜货位-Service
 *
 * @author
 */
public interface CabinetCargoSpaceService extends IService<CabinetCargoSpace> {

    /**
     * 添加
     *
     * @param cabinetCargoSpaceForm
     * @return
     */
    int add(CabinetCargoSpaceForm cabinetCargoSpaceForm);

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<CabinetCargoSpaceVO> list4app(Map<String, Object> params);

    /**
     * 分页list-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    Page<CabinetCargoSpaceVO> pageList4app(Page page, Map<String, Object> params);

    Page<CabinetCargoSpaceVO> pageList4MainCab(Page page, Map<String, Object> params);

    Page<CabinetCargoSpaceVO> pageList4Cab(Page page, Map<String, Object> params);

    Page<CabinetCargoSpaceVO> pageList4Load(Page page, Map<String, Object> params);

    Page<CabinetCargoSpaceVO> pageList4pc(Page page, Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    CabinetCargoSpaceVO get4appById(Long id);

    List<CabinetCargoSpaceVO> getUsableSpace(String cabCode,Integer businessType, Integer quantity,String skuCode,Integer spaceNature,Long principal,  Long spaceProductType);

    List<CabinetCargoSpaceVO> getUsedSpace(String cabCode,Integer businessType, Integer quantity,String skuCode,String spaceNature,Integer spaceNatureValue,Long principal,  Long spaceProductType,Long creator);

    List<CabinetCargoSpaceVO> getUsedSpace(String cabCode,Integer spaceType,Long principal,  Long spaceProductType,String skuCode,String skuCodeCurrent, Integer quantity,Integer businessType);

    List<CabinetCargoSpaceVO> getEmptySpaces(String cabCode, String spaceNature,Integer spaceNatureValue,Long principal,  Long spaceProductType );

    List<CabinetCargoSpaceVO> getRecycleRepairSpaces(String cabCode, Integer spaceNature,Long principal,  Long spaceProductType );

    List<CabinetCargoSpaceVO> getEmptySpaces(String cabCode,Integer spaceType,Long principal,  Long spaceProductType,String skuCode);

    List<CabinetCargoSpaceVO> getSpaceByCabCode(String cabCode);

    List<CabinetCargoSpaceVO> getUserSpaceByCabCode(String cabCode,List<Integer> spaceTyps,Long userId);

    Page<CabinetCargoSpaceVO> cellListLoad(Page page, Map<String, Object> params);
}
